package com.gjl.app.view.web;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;

import com.gjl.app.model.business.entity.util.EntityManagerUtil;
import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport {

	private static final long serialVersionUID = -58941434176691931L;

	protected EntityManager getEntityManager() {
		EntityManagerFactory  emf = EntityManagerUtil.getEntityManagerFactoryInstance();
		EntityManager entityManager = emf.createEntityManager();
		return entityManager;
	}
	
}
